<?php
    require_once('../includes/DbConnector.php');
    
    if(isset($_POST['action']) && !empty($_POST['action'])) {
        // INPUT DATA.
        $action = $_POST['action'];
        $barid = $_POST['barid'];
        $latlong = $_POST['geoLocation'];
        $connector  = new DbConnector();
        
        $sql = "update bar
                SET latlong = '$latlong'
                where bar_id = '$barid';";
        $result = $connector->query($sql);
        
        if($result){
            echo "Success";
        }
    }
?>